package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.DoctorScheduling;
import com.example.pojo.Scheduling;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * (Scheduling)表数据库访问层
 *
 * @email: pengyujun53@163.com
 * @author: peng_YuJun
 * @date: 2024/02/25
 * @time: 00:04
 */
@Repository
public interface SchedulingMapper extends BaseMapper<Scheduling> {
    /**
     * 根据机构编码和日期查询
     * @param entCode
     * @param date
     * @return
     */
    List<DoctorScheduling> selectDoctorScheduling(@Param("entCode") String entCode, @Param("date") String date);

    /**
     * 更新余量
     *
     * @param date
     * @param drId
     * @return
     */
    int updateSchedulingRest(@Param("date") Date date, @Param("drId") Long drId);
}

